extends Node

@export var chunk_instance: ChunkIntance

var _data: ChunkData

func _ready() -> void:
	_data = ChunkData.new()
	_data.resize(16, 16, 16)

func generate_line(dir: Vector3):
	print("generate:", dir)
	var rank = range(3)
	rank.sort_custom(func(l, r): return dir[l] > dir[r])
	
	dir /= dir[rank[0]]
	
	print(dir)
	
	var p := Vector3.ZERO
	var aabb = AABB(p, _data.size)
	#while aabb.has_point(p):
		#p += dir
		#pass
	
	#_data.clear()
	#
	#
	#chunk_instance.generate_mesh(_data)
	pass
